package com.shop.agentDataImpl;

public enum ShopWindowDataEnum {


    /**
     * 客户首页橱窗
     */
    CLIENT_SHOW_WINDOW("clientShopWindowDataImpl", "ClientShopWindowDataImpl", "客户首页橱窗"),
    FACTORY_SHOW_WINDOW("factoryShopWindowDataImpl", "FactoryShopWindowDataImpl", "进货首页橱窗");

    ShopWindowDataEnum(String code, String type, String desc) {
        this.code = code;
        this.type = type;
        this.desc = desc;
    }

    public String code;

    public String type;

    public String desc;

    public static String getImplByCode(String type) throws Exception {
        if (type == null) throw new Exception("没有找到实体类");
        for (ShopWindowDataEnum item : values()) {
            if (item.type.equals(type)) {
               return item.code;
            }
        }
        return null;
    }

}
